package Mash.UI;

import java.awt.*;/*Copyright (c)  Sergey Schekochikhin (Genocidicbunny)
 * created on Jul 30, 2009 4:10:52 PM
 */

public enum Options {
	XRES(0,0, "X Resolution", "Use the arrow keys or press Enter \n to change resolution"),
	YRES(0,0, "Y Resolution",  "Use the arrow keys or press Enter \n to change resolution"),
	GOBACK(0,0, "Go Back", "Go Back to Main Menu");
	private int xsize, ysize;
	private String myName, myHelp;
	private Options(int x, int y, String name, String helpString){
		xsize = x; ysize = y; myName = name; myHelp = helpString;
	}
	public void setRes(int x, int y){
		xsize = x; ysize = y;
	}
    public Dimension getRes(){
		return new Dimension(xsize, ysize);
	}
	public String getName(){
		return myName;
	}
	public String getHelpText(){
		return myHelp;
	}
	public static Options getNext(Options o){
		switch(o){
			case XRES: return YRES;
			case YRES: return GOBACK;
			case GOBACK: return XRES;
		}
		return null;
	}
	public static Options getPrevious(Options o){
		switch(o){
			case XRES: return GOBACK;
			case YRES: return XRES;
			case GOBACK: return YRES;
		}
		return null;
	}
}
